<?php echo '<?xml version="1.0"';?> encoding="<?php echo isset($feed['encoding']) ? $feed['encoding'] : DEFAULT_CHARSET ?>"?><feed version="0.3"
  xmlns="http://purl.org/atom/ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="<?php echo isset($feed['language']) ? $feed['language'] : 'en' ?>"
    >
	<title><?php echo htmlentities($feed['title'], DEFAULT_CHARSET) ?></title>
	<link rel="alternate" type="text/html" href="<?php echo $feed['link'] ?>" />
	<tagline><?php echo htmlentities($feed['description'], DEFAULT_CHARSET) ?></tagline>
	<modified>2006-08-23T19:45:39Z</modified>
	<copyright>Copyright <?php echo date('Y') ?></copyright>
	<generator url="http://www.thebusypixel.com" version="2">Pixel App</generator>
<?php
if ( !empty($feed['items']) && is_array($feed['items']) )
{
    foreach($feed['items'] as $item)
    {
?>	
	<entry>
	  	<author>
			<name><?php echo htmlentities($item['author'], DEFAULT_CHARSET) ?></name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[<?php echo htmlentities(strip_tags($item['title']), DEFAULT_CHARSET) ?>]]></title>
		<link rel="alternate" type="text/html" href="<?php echo $item['link'] ?>" />
		<id><?php echo $item['guid'] ?></id>
		<modified><?php
		echo isset($item['publish_date_modified'])  ?
			 date('Y-m-dTH:i:sZ',$item['publish_date_modified']) : 
		     date('Y-m-dTH:i:sZ',$item['publish_date']);
		     ?></modified>
		<issued><?php echo date('Y-m-dTH:i:sZ',$item['publish_date']) ?></issued>
		
		<summary type="text/plain" mode="escaped"><![CDATA[<?php echo strip_tags($item['description']) ?>]]></summary>
		<content type="text/html" mode="escaped" xml:base="http://www.thebusypixel.com/2006/08/23/lasik-gone-bad/"><![CDATA[<?php echo $item['content_encoded'] ?>]]></content>
	</entry>
<?php

   }
}
?>		
</feed>
